package com.yj.timecapsule.mapper;

import com.github.pagehelper.Page;
import com.yj.timecapsule.entity.comments.Comments;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommentsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Comments record);

    int insertSelective(Comments record);

    Comments selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Comments record);

    int updateByPrimaryKeyWithBLOBs(Comments record);

    int updateByPrimaryKey(Comments record);

    Long selectCountByDiariesId(@Param("diariesId") Long diariesId);

    Page<Comments> selectByDiariesId(@Param("diariesId") Long id);

    List<Comments> selectByParentId(@Param("parentId") Long id);

    void deleteByIds(@Param("ids") List<Long> ids);
}